import { PickDto, Rule, RuleType } from '@midwayjs/validate';


export class PagingInfo {
  @Rule(RuleType.number().default(0))
  skip?: number; //页码
  @Rule(RuleType.number().default(20))
  take?: number; //数量
}

export class ImageDTO {
  @Rule(RuleType.number().required())
  id: number;
  @Rule(RuleType.string())
  name: string;
}

export class nameDTO extends PickDto(ImageDTO, ['name']) {
}

export class IdDTO extends PickDto(ImageDTO, ['id']) {
}

export class getAllImagesInfo extends PagingInfo {
  @Rule(RuleType.string())
  name?: string;
}


